package com.xbzl.cly_demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xbzl.cly_demo.dto.UsersDTO;
import com.xbzl.cly_demo.entity.Users;
import com.xbzl.cly_demo.service.UsersService;
import com.xbzl.cly_demo.mapper.UsersMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
* @author 26586
* @description 针对表【users】的数据库操作Service实现
* @createDate 2025-04-02 14:06:06
*/
@Service
public class UsersServiceImpl extends ServiceImpl<UsersMapper, Users>
    implements UsersService{
    @Override
    public long register(UsersDTO usersDTO) {
        Users user = new Users();
        BeanUtils.copyProperties(usersDTO,user);
        user.setAuthority("0");
        save(user);
        return user.getUserid();
    }
}




